package com.quanyan.search.service;

import com.quanyan.api.APIResponse;
import com.quanyan.search.entity.request.ReqPlaceSearchInfo;
import com.quanyan.search.entity.request.ReqPlaceSearchInfoNew;
import com.quanyan.search.entity.response.PlaceSearchResponse;
import com.quanyan.search.entity.response.SearchResponses;
import com.quanyan.search.entity.vo.PlaceIndexInfo;

import java.util.List;

/**
 * PlaceSearchService
 * 场馆搜索
 * @author Tu Chun
 * @date 2016/6/4
 */
public interface PlaceSearchService {
    String getURL() ;

    void setURL(String URL);


    /**
     * 添加场馆索引
     * @param insertPlaceIndexInfo
     * @return
     */
    APIResponse insertDoc(PlaceIndexInfo insertPlaceIndexInfo);

    /**
     * 添加多个场馆索引
     * @param insertPlaceIndexInfos
     * @return
     */
    APIResponse insertDocs(List<PlaceIndexInfo> insertPlaceIndexInfos);

    /**
     * 根据id删除Document
     * @param id
     * @param type 1 销售计划id 2 场馆id
     * @return
     */
    APIResponse deleteDocById(Integer id,Integer type);



    /**
     * 删除多个Document
     * @param ids
     * @param type 1 销售计划id 2 场馆id
     * @return
     */
    APIResponse deleteDocsByIds(List<Integer> ids,Integer type);



    /**
     * 根据id搜索场馆信息
     * @param id
     * @param type 1 销售计划id 2 场馆id
     * @return
     */
    APIResponse<PlaceIndexInfo> searchPlaceInfo(Integer id,Integer type);

    /**
     * 根据场馆ids查找场馆
     * @param placeIds
     * @return
     */
    APIResponse<List<PlaceSearchResponse>> searchPlaceInfoByPlaceIds(List<Integer> placeIds);


    /**
     * 查询场馆14天前的数据
     * @return
     */
     APIResponse<List<PlaceIndexInfo>> searchPlaceInfoBefore14Day();

    /**
     * 根据条件搜索
     * @param reqPlaceSearchInfo
     * @return
     */
    APIResponse<SearchResponses<List<PlaceSearchResponse>>> searchPlaceInfoList(ReqPlaceSearchInfo reqPlaceSearchInfo);
    /**
     * 根据条件搜索 新
     * @param reqPlaceSearchInfo
     * @return
     */
    APIResponse<SearchResponses<List<PlaceSearchResponse>>> searchPlaceInfoListNew(ReqPlaceSearchInfoNew reqPlaceSearchInfo);

    /**
     * 删除所有Doc
     * @return
     */
    APIResponse deleteAllDoc(Integer type);
}
